import { Module, Global } from '@nestjs/common';
import { JwtModule } from '@nestjs/jwt';
import { JwtStrategy } from './jwt.strategy';
import { AuthService } from './services/auth/auth.service';

@Global()
@Module({
  imports: [
    JwtModule.register({ 
      secret: 'abc',
      signOptions: {
        expiresIn: '7d', // 设置过期时间为7天
      }
    }),
  ],
  providers: [AuthService, JwtStrategy],
  exports: [AuthService]
})
export class AuthModule { }